package com.hrm.model.daoimple;

import java.util.List;

import org.springframework.orm.ibatis.support.SqlMapClientDaoSupport;

import com.hrm.model.dao.EducationDAO;
import com.hrm.model.dto.insa.EducationDTO;

public class EducationDAOImple extends SqlMapClientDaoSupport implements EducationDAO{

	@Override
	public List<EducationDTO> getEducation(EducationDTO dto) {
		return this.getSqlMapClientTemplate().queryForList("EducationMap.getEducation", dto);
	}

	@Override
	public boolean insertEducation(EducationDTO dto) {
		try {
			this.getSqlMapClientTemplate().insert("EducationMap.insertEducation", dto);
			return true;
		} catch (Exception e) {
			return false;
		}
	}

	@Override
	public void updateEducation(EducationDTO dto) {
		this.getSqlMapClientTemplate().update("EducationMap.updateEducation", dto);
	}
	
	@Override
	public void deleteEducation(EducationDTO dto) {
		this.getSqlMapClientTemplate().delete("EducationMap.deleteEducation", dto);
	}

	

}
